<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.ok {
				color: green;
			}
			.error {
				color: blue;
			}
		</style>
	</head>
	<body>
		<script type="text/javascript">
			var varReg = /[0-9_]{5,10}/;
			function checkName() {
				var name = document.getElementById("name");
				if () {
					
				}
			}
		</script>
		<table>
			<tr>
				<td>名字：</td>
				<td>
					<input type="text" id="name" onblur="checkName()">
				</td>
				<td>
					<span class="ok" id="nameMsg">5-10位字母、数字、下划线</span>
				</td>
			</tr>
			<tr>
				<td>邮箱：</td>
				<td>
					<input type="text" id="mail" onblur="checkMail()">
				</td>
				<td>
					<span class="ok" id="mail">必须符合邮箱的格式</span>
				</td>
			</tr>
		</table>
	</body>
</html>
